package lucky.xiong.basic.内部类;

import com.alibaba.fastjson.JSONObject;

import java.util.List;

public class Run {
    public static void main(String[] args) {
//        testA();
//    testB();
        test3();

    }


    static void test3(){
        A a = new A();
        a.setCODE("test222");
        System.out.println("a:"+a.hashCode()+a.getAboolean());
        System.out.println(a);
        System.out.println("boolean:"+a.getAboolean().hashCode());

        setBoolean(a);
        setCode(a);
        System.out.println("a:"+a.hashCode()+a.getAboolean());
        System.out.println(a);
        System.out.println("boolean:"+a.getAboolean().hashCode());



    }

    private static void setBoolean(A a){
        a.setAboolean(true);
    }
    private static void setCode(A a){
        a.setCODE("test222");
    }

    public static void testA(){
        A a = new A();
        System.out.println(a);
        a.setCODE("test");
        A.DATA data = a.getDATA();
        data.setUUID("111");
        System.out.println(a);
        A.DATAINFOS datainfos = data.getDATAINFOS();
        List<A.DATAINFO> datainfos1 = datainfos.getDATAINFOS();
        datainfos1.add(A.DATAINFO.builder().code(11L).build());
        System.out.println(datainfos1);
        System.out.println(a);

        String s = JSONObject.toJSONString(a);
        System.out.println(s);
    }

    public static void testB(){
       B b = new B();
        C c = b.getC();
        System.out.println(b);
    }
}
